import json

s1 = """
{
	"exec": [{
		"title": "广告类型分析",
		"func_name": "campaign_type_performance",
		"use_cases": "评估SP、SB、SD三种广告类型的表现差异及业务占比",
		"params": {
			"metrics": ["Impression", "Click", "Spend", "TotalSales", "TotalPurchases", "CPC", "ACOS", "ROAS", "CVR", "CPA", "TotalSalesSameSKU", "TotalSalesOtherSKU", "TotalPurchasesSameSKU", "TotalPurchasesOtherSKU"],
			"prev_type": "1"
		}
	}, {
		"title": "定向类型分析",
		"func_name": "match_type_analysis",
		"use_cases": "深入分析各广告类型下不同定向类型的表现",
		"params": {
			"metrics": ["Impression", "Click", "Spend", "TotalSales", "TotalPurchases", "CPC", "ACOS", "ROAS", "CVR", "CPA", "TotalSalesSameSKU", "TotalSalesOtherSKU", "TotalPurchasesSameSKU", "TotalPurchasesOtherSKU"],
			"prev_type": "2",
			"group": "campaign_type"
		}
	}],
	"desc": "- 报告将提供广告类型分析及定向类型分析的详细信息\\n- 定向类型分析将按广告活动类型进行比对\\n- 使用同比+环比对比方式进行分析\\n- 指标包括曝光量、点击量、花费、销售额、订单数、ACOS/ROAS、CVR、CPC、CPA、推广商品销售额、其他商品销售额、推广商品订单数、其他商品订单数\\n- 如有其他需求请告知"
}
"""

if __name__ == '__main__':
    s1 = s1.replace('\n-', '\\n-')
    print(s1)
    json_data = json.loads(s1)


